﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/JOC-PC
 * 时间：2013-12-16 16:31:20
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.Settlement
{
	/// <summary>附加费用</summary>
	[Serializable]
	[DataObject]
	[Description("附加费用")]
	[BindIndex("IX_AdditionalCost_Category", false, "BusinessCategory,GoodsCategory")]
	[BindIndex("IX_AdditionalCostID_Code", true, "Code")]
	[BindIndex("PK__AdditionalCostID__9C4C2C152717E0E2", true, "ID")]
	[BindTable("AdditionalCost", Description = "附加费用", ConnName = "EmeSettlement", DbType = DatabaseType.SqlServer)]
	public abstract partial class AdditionalCost<TEntity> : IAdditionalCost
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private String _Code;

		/// <summary>代码</summary>
		[DisplayName("代码")]
		[Description("代码")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(2, "Code", "代码", null, "nvarchar(50)", 0, 0, true)]
		public virtual String Code
		{
			get { return _Code; }
			set { if (OnPropertyChanging(__.Code, value)) { _Code = value; OnPropertyChanged(__.Code); } }
		}

		private String _Name;

		/// <summary>名称</summary>
		[DisplayName("名称")]
		[Description("名称")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(3, "Name", "名称", null, "nvarchar(50)", 0, 0, true)]
		public virtual String Name
		{
			get { return _Name; }
			set { if (OnPropertyChanging(__.Name, value)) { _Name = value; OnPropertyChanged(__.Name); } }
		}

		private Int32 _BusinessCategory;

		/// <summary>业务类别</summary>
		[DisplayName("业务类别")]
		[Description("业务类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "BusinessCategory", "业务类别", null, "int", 10, 0, false)]
		public virtual Int32 BusinessCategory
		{
			get { return _BusinessCategory; }
			set { if (OnPropertyChanging(__.BusinessCategory, value)) { _BusinessCategory = value; OnPropertyChanged(__.BusinessCategory); } }
		}

		private Int32 _GoodsCategory;

		/// <summary>货物类别</summary>
		[DisplayName("货物类别")]
		[Description("货物类别")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(5, "GoodsCategory", "货物类别", null, "int", 10, 0, false)]
		public virtual Int32 GoodsCategory
		{
			get { return _GoodsCategory; }
			set { if (OnPropertyChanging(__.GoodsCategory, value)) { _GoodsCategory = value; OnPropertyChanged(__.GoodsCategory); } }
		}

		private Int32 _FuelModel;

		/// <summary>燃油计费模式</summary>
		[DisplayName("燃油计费模式")]
		[Description("燃油计费模式")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(6, "FuelModel", "燃油计费模式", null, "int", 10, 0, false)]
		public virtual Int32 FuelModel
		{
			get { return _FuelModel; }
			set { if (OnPropertyChanging(__.FuelModel, value)) { _FuelModel = value; OnPropertyChanged(__.FuelModel); } }
		}

		private Decimal _FuelData;

		/// <summary>燃油计费数值</summary>
		[DisplayName("燃油计费数值")]
		[Description("燃油计费数值")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(7, "FuelData", "燃油计费数值", null, "money", 19, 4, false)]
		public virtual Decimal FuelData
		{
			get { return _FuelData; }
			set { if (OnPropertyChanging(__.FuelData, value)) { _FuelData = value; OnPropertyChanged(__.FuelData); } }
		}

		private Boolean _IsCustomsDeclaration;

		/// <summary>是否包括报关费用</summary>
		[DisplayName("是否包括报关费用")]
		[Description("是否包括报关费用")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(8, "IsCustomsDeclaration", "是否包括报关费用", null, "bit", 0, 0, false)]
		public virtual Boolean IsCustomsDeclaration
		{
			get { return _IsCustomsDeclaration; }
			set { if (OnPropertyChanging(__.IsCustomsDeclaration, value)) { _IsCustomsDeclaration = value; OnPropertyChanged(__.IsCustomsDeclaration); } }
		}

		private Decimal _CustomsDeclarationCost;

		/// <summary>报关费用</summary>
		[DisplayName("报关费用")]
		[Description("报关费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(9, "CustomsDeclarationCost", "报关费用", null, "money", 19, 4, false)]
		public virtual Decimal CustomsDeclarationCost
		{
			get { return _CustomsDeclarationCost; }
			set { if (OnPropertyChanging(__.CustomsDeclarationCost, value)) { _CustomsDeclarationCost = value; OnPropertyChanged(__.CustomsDeclarationCost); } }
		}

		private Boolean _IsFareCustomsHK;

		/// <summary>是否包括过港车费</summary>
		[DisplayName("是否包括过港车费")]
		[Description("是否包括过港车费")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(10, "IsFareCustomsHK", "是否包括过港车费", null, "bit", 0, 0, false)]
		public virtual Boolean IsFareCustomsHK
		{
			get { return _IsFareCustomsHK; }
			set { if (OnPropertyChanging(__.IsFareCustomsHK, value)) { _IsFareCustomsHK = value; OnPropertyChanged(__.IsFareCustomsHK); } }
		}

		private Decimal _FareCustomsHK;

		/// <summary>过港车费</summary>
		[DisplayName("过港车费")]
		[Description("过港车费")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(11, "FareCustomsHK", "过港车费", null, "money", 19, 4, false)]
		public virtual Decimal FareCustomsHK
		{
			get { return _FareCustomsHK; }
			set { if (OnPropertyChanging(__.FareCustomsHK, value)) { _FareCustomsHK = value; OnPropertyChanged(__.FareCustomsHK); } }
		}

		private Boolean _IsWarehousingTemporary;

		/// <summary>是否包括临时仓储费用</summary>
		[DisplayName("是否包括临时仓储费用")]
		[Description("是否包括临时仓储费用")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(12, "IsWarehousingTemporary", "是否包括临时仓储费用", null, "bit", 0, 0, false)]
		public virtual Boolean IsWarehousingTemporary
		{
			get { return _IsWarehousingTemporary; }
			set { if (OnPropertyChanging(__.IsWarehousingTemporary, value)) { _IsWarehousingTemporary = value; OnPropertyChanged(__.IsWarehousingTemporary); } }
		}

		private Decimal _WarehousingTemporary;

		/// <summary>临时仓库服务费用</summary>
		[DisplayName("临时仓库服务费用")]
		[Description("临时仓库服务费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(13, "WarehousingTemporary", "临时仓库服务费用", null, "money", 19, 4, false)]
		public virtual Decimal WarehousingTemporary
		{
			get { return _WarehousingTemporary; }
			set { if (OnPropertyChanging(__.WarehousingTemporary, value)) { _WarehousingTemporary = value; OnPropertyChanged(__.WarehousingTemporary); } }
		}

		private Boolean _IsOtherCost;

		/// <summary>是否包括其它费用</summary>
		[DisplayName("是否包括其它费用")]
		[Description("是否包括其它费用")]
		[DataObjectField(false, false, false, 1)]
		[BindColumn(14, "IsOtherCost", "是否包括其它费用", null, "bit", 0, 0, false)]
		public virtual Boolean IsOtherCost
		{
			get { return _IsOtherCost; }
			set { if (OnPropertyChanging(__.IsOtherCost, value)) { _IsOtherCost = value; OnPropertyChanged(__.IsOtherCost); } }
		}

		private Decimal _OtherCost;

		/// <summary>其它费用</summary>
		[DisplayName("其它费用")]
		[Description("其它费用")]
		[DataObjectField(false, false, false, 19)]
		[BindColumn(15, "OtherCost", "其它费用", null, "money", 19, 4, false)]
		public virtual Decimal OtherCost
		{
			get { return _OtherCost; }
			set { if (OnPropertyChanging(__.OtherCost, value)) { _OtherCost = value; OnPropertyChanged(__.OtherCost); } }
		}

		private String _Descript;

		/// <summary>描述</summary>
		[DisplayName("描述")]
		[Description("描述")]
		[DataObjectField(false, false, true, 400)]
		[BindColumn(16, "Descript", "描述", null, "nvarchar(400)", 0, 0, true)]
		public virtual String Descript
		{
			get { return _Descript; }
			set { if (OnPropertyChanging(__.Descript, value)) { _Descript = value; OnPropertyChanged(__.Descript); } }
		}

		private DateTime _ModifiedOn;

		/// <summary>修改时间</summary>
		[DisplayName("修改时间")]
		[Description("修改时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(17, "ModifiedOn", "修改时间", null, "datetime", 3, 0, false)]
		public virtual DateTime ModifiedOn
		{
			get { return _ModifiedOn; }
			set { if (OnPropertyChanging(__.ModifiedOn, value)) { _ModifiedOn = value; OnPropertyChanged(__.ModifiedOn); } }
		}

		private Int32 _ModifiedUserID;

		/// <summary>修改用户ID</summary>
		[DisplayName("修改用户ID")]
		[Description("修改用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(18, "ModifiedUserID", "修改用户ID", null, "int", 10, 0, false)]
		public virtual Int32 ModifiedUserID
		{
			get { return _ModifiedUserID; }
			set { if (OnPropertyChanging(__.ModifiedUserID, value)) { _ModifiedUserID = value; OnPropertyChanged(__.ModifiedUserID); } }
		}

		private String _ModifiedBy;

		/// <summary>修改用户</summary>
		[DisplayName("修改用户")]
		[Description("修改用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(19, "ModifiedBy", "修改用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ModifiedBy
		{
			get { return _ModifiedBy; }
			set { if (OnPropertyChanging(__.ModifiedBy, value)) { _ModifiedBy = value; OnPropertyChanged(__.ModifiedBy); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(20, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(21, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(22, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.Code: return _Code;
					case __.Name: return _Name;
					case __.BusinessCategory: return _BusinessCategory;
					case __.GoodsCategory: return _GoodsCategory;
					case __.FuelModel: return _FuelModel;
					case __.FuelData: return _FuelData;
					case __.IsCustomsDeclaration: return _IsCustomsDeclaration;
					case __.CustomsDeclarationCost: return _CustomsDeclarationCost;
					case __.IsFareCustomsHK: return _IsFareCustomsHK;
					case __.FareCustomsHK: return _FareCustomsHK;
					case __.IsWarehousingTemporary: return _IsWarehousingTemporary;
					case __.WarehousingTemporary: return _WarehousingTemporary;
					case __.IsOtherCost: return _IsOtherCost;
					case __.OtherCost: return _OtherCost;
					case __.Descript: return _Descript;
					case __.ModifiedOn: return _ModifiedOn;
					case __.ModifiedUserID: return _ModifiedUserID;
					case __.ModifiedBy: return _ModifiedBy;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.Code: _Code = Convert.ToString(value); break;
					case __.Name: _Name = Convert.ToString(value); break;
					case __.BusinessCategory: _BusinessCategory = Convert.ToInt32(value); break;
					case __.GoodsCategory: _GoodsCategory = Convert.ToInt32(value); break;
					case __.FuelModel: _FuelModel = Convert.ToInt32(value); break;
					case __.FuelData: _FuelData = Convert.ToDecimal(value); break;
					case __.IsCustomsDeclaration: _IsCustomsDeclaration = Convert.ToBoolean(value); break;
					case __.CustomsDeclarationCost: _CustomsDeclarationCost = Convert.ToDecimal(value); break;
					case __.IsFareCustomsHK: _IsFareCustomsHK = Convert.ToBoolean(value); break;
					case __.FareCustomsHK: _FareCustomsHK = Convert.ToDecimal(value); break;
					case __.IsWarehousingTemporary: _IsWarehousingTemporary = Convert.ToBoolean(value); break;
					case __.WarehousingTemporary: _WarehousingTemporary = Convert.ToDecimal(value); break;
					case __.IsOtherCost: _IsOtherCost = Convert.ToBoolean(value); break;
					case __.OtherCost: _OtherCost = Convert.ToDecimal(value); break;
					case __.Descript: _Descript = Convert.ToString(value); break;
					case __.ModifiedOn: _ModifiedOn = Convert.ToDateTime(value); break;
					case __.ModifiedUserID: _ModifiedUserID = Convert.ToInt32(value); break;
					case __.ModifiedBy: _ModifiedBy = Convert.ToString(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得附加费用字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>代码</summary>
			public static readonly Field Code = FindByName(__.Code);

			///<summary>名称</summary>
			public static readonly Field Name = FindByName(__.Name);

			///<summary>业务类别</summary>
			public static readonly Field BusinessCategory = FindByName(__.BusinessCategory);

			///<summary>货物类别</summary>
			public static readonly Field GoodsCategory = FindByName(__.GoodsCategory);

			///<summary>燃油计费模式</summary>
			public static readonly Field FuelModel = FindByName(__.FuelModel);

			///<summary>燃油计费数值</summary>
			public static readonly Field FuelData = FindByName(__.FuelData);

			///<summary>是否包括报关费用</summary>
			public static readonly Field IsCustomsDeclaration = FindByName(__.IsCustomsDeclaration);

			///<summary>报关费用</summary>
			public static readonly Field CustomsDeclarationCost = FindByName(__.CustomsDeclarationCost);

			///<summary>是否包括过港车费</summary>
			public static readonly Field IsFareCustomsHK = FindByName(__.IsFareCustomsHK);

			///<summary>过港车费</summary>
			public static readonly Field FareCustomsHK = FindByName(__.FareCustomsHK);

			///<summary>是否包括临时仓储费用</summary>
			public static readonly Field IsWarehousingTemporary = FindByName(__.IsWarehousingTemporary);

			///<summary>临时仓库服务费用</summary>
			public static readonly Field WarehousingTemporary = FindByName(__.WarehousingTemporary);

			///<summary>是否包括其它费用</summary>
			public static readonly Field IsOtherCost = FindByName(__.IsOtherCost);

			///<summary>其它费用</summary>
			public static readonly Field OtherCost = FindByName(__.OtherCost);

			///<summary>描述</summary>
			public static readonly Field Descript = FindByName(__.Descript);

			///<summary>修改时间</summary>
			public static readonly Field ModifiedOn = FindByName(__.ModifiedOn);

			///<summary>修改用户ID</summary>
			public static readonly Field ModifiedUserID = FindByName(__.ModifiedUserID);

			///<summary>修改用户</summary>
			public static readonly Field ModifiedBy = FindByName(__.ModifiedBy);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得附加费用字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>代码</summary>
			public const String Code = "Code";

			///<summary>名称</summary>
			public const String Name = "Name";

			///<summary>业务类别</summary>
			public const String BusinessCategory = "BusinessCategory";

			///<summary>货物类别</summary>
			public const String GoodsCategory = "GoodsCategory";

			///<summary>燃油计费模式</summary>
			public const String FuelModel = "FuelModel";

			///<summary>燃油计费数值</summary>
			public const String FuelData = "FuelData";

			///<summary>是否包括报关费用</summary>
			public const String IsCustomsDeclaration = "IsCustomsDeclaration";

			///<summary>报关费用</summary>
			public const String CustomsDeclarationCost = "CustomsDeclarationCost";

			///<summary>是否包括过港车费</summary>
			public const String IsFareCustomsHK = "IsFareCustomsHK";

			///<summary>过港车费</summary>
			public const String FareCustomsHK = "FareCustomsHK";

			///<summary>是否包括临时仓储费用</summary>
			public const String IsWarehousingTemporary = "IsWarehousingTemporary";

			///<summary>临时仓库服务费用</summary>
			public const String WarehousingTemporary = "WarehousingTemporary";

			///<summary>是否包括其它费用</summary>
			public const String IsOtherCost = "IsOtherCost";

			///<summary>其它费用</summary>
			public const String OtherCost = "OtherCost";

			///<summary>描述</summary>
			public const String Descript = "Descript";

			///<summary>修改时间</summary>
			public const String ModifiedOn = "ModifiedOn";

			///<summary>修改用户ID</summary>
			public const String ModifiedUserID = "ModifiedUserID";

			///<summary>修改用户</summary>
			public const String ModifiedBy = "ModifiedBy";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";
		}

		#endregion
	}

	/// <summary>附加费用接口</summary>
	public partial interface IAdditionalCost
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>代码</summary>
		String Code { get; set; }

		/// <summary>名称</summary>
		String Name { get; set; }

		/// <summary>业务类别</summary>
		Int32 BusinessCategory { get; set; }

		/// <summary>货物类别</summary>
		Int32 GoodsCategory { get; set; }

		/// <summary>燃油计费模式</summary>
		Int32 FuelModel { get; set; }

		/// <summary>燃油计费数值</summary>
		Decimal FuelData { get; set; }

		/// <summary>是否包括报关费用</summary>
		Boolean IsCustomsDeclaration { get; set; }

		/// <summary>报关费用</summary>
		Decimal CustomsDeclarationCost { get; set; }

		/// <summary>是否包括过港车费</summary>
		Boolean IsFareCustomsHK { get; set; }

		/// <summary>过港车费</summary>
		Decimal FareCustomsHK { get; set; }

		/// <summary>是否包括临时仓储费用</summary>
		Boolean IsWarehousingTemporary { get; set; }

		/// <summary>临时仓库服务费用</summary>
		Decimal WarehousingTemporary { get; set; }

		/// <summary>是否包括其它费用</summary>
		Boolean IsOtherCost { get; set; }

		/// <summary>其它费用</summary>
		Decimal OtherCost { get; set; }

		/// <summary>描述</summary>
		String Descript { get; set; }

		/// <summary>修改时间</summary>
		DateTime ModifiedOn { get; set; }

		/// <summary>修改用户ID</summary>
		Int32 ModifiedUserID { get; set; }

		/// <summary>修改用户</summary>
		String ModifiedBy { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}